/*
Copyright 2022 The Numaproj Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Code generated by Openapi Generator. DO NOT EDIT.

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Edge {
    #[serde(rename = "conditions", skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Box<crate::models::ForwardConditions>>,
    #[serde(rename = "from")]
    pub from: String,
    /// OnFull specifies the behaviour for the write actions when the inter step buffer is full. There are currently two options, retryUntilSuccess and discardLatest. if not provided, the default value is set to \"retryUntilSuccess\"
    #[serde(rename = "onFull", skip_serializing_if = "Option::is_none")]
    pub on_full: Option<String>,
    #[serde(rename = "to")]
    pub to: String,
}

impl Edge {
    pub fn new(from: String, to: String) -> Edge {
        Edge {
            conditions: None,
            from,
            on_full: None,
            to,
        }
    }
}
